package com.example.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.example.entity.ygc_user;
import com.example.service.ygcUserService;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.Resources;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
public class ygcUserController {

    @Resource
    ygcUserService ygcService;

    @GetMapping("/ygc2")
    public ygc_user selectById(){
        ygc_user ygc_user = ygcService.queryById(1);
        return ygc_user;
    }


    @GetMapping("/ygc3")
    public List<ygc_user> qw(){
        List<ygc_user> list = ygcService.queryWrapper();
        return  list;
    }
    @GetMapping("/ygc4")
    public List<ygc_user> test(){
        List<ygc_user> list = ygcService.filter();
        return  list;
    }
    @GetMapping("/ygc5")
    public List<ygc_user> test2(){
        List<ygc_user> limit = ygcService.limit();
        return limit;

    }
}
